package cn.gson.boot.model.pojos;

import javax.persistence.*;
import java.sql.Timestamp;
import java.util.Objects;

@Entity
@Table(name = "work_", schema = "boot", catalog = "")
//工作日志表
public class Work {
    private int workId;//工作日志id
    private User empId;//员工id
    private String workTitle;//日志标题
    private String workType;//日志类别
    private String workContent;//内容概况
    private String workCondition;//点评状态
    private Timestamp workTime;//创建时间
    private String workJihua;//计划

    @Id
    @Column(name = "Work_id", nullable = false)
    @GeneratedValue(strategy = GenerationType.IDENTITY,generator = "seq")
    public int getWorkId() {
        return workId;
    }

    public void setWorkId(int workId) {
        this.workId = workId;
    }

    //多个日报对应一个用户
    @ManyToOne
    @JoinColumn(name = "emp_id", nullable = true)
    public User getEmpId() {
        return empId;
    }

    public void setEmpId(User empId) {
        this.empId = empId;
    }

    @Basic
    @Column(name = "Work_title", nullable = true, length = 255)
    public String getWorkTitle() {
        return workTitle;
    }

    public void setWorkTitle(String workTitle) {
        this.workTitle = workTitle;
    }

    @Basic
    @Column(name = "Work_type", nullable = true, length = 255)
    public String getWorkType() {
        return workType;
    }

    public void setWorkType(String workType) {
        this.workType = workType;
    }

    @Basic
    @Column(name = "Work_content", nullable = true, length = 255)
    public String getWorkContent() {
        return workContent;
    }

    public void setWorkContent(String workContent) {
        this.workContent = workContent;
    }

    @Basic
    @Column(name = "Work_condition", nullable = true, length = 255)
    public String getWorkCondition() {
        return workCondition;
    }

    public void setWorkCondition(String workCondition) {
        this.workCondition = workCondition;
    }

    @Basic
    @Column(name = "work_time", nullable = false)
    public Timestamp getWorkTime() {
        return workTime;
    }

    public void setWorkTime(Timestamp workTime) {
        this.workTime = workTime;
    }

    @Basic
    @Column(name = "work_jihua", nullable = true, length = 255)
    public String getWorkJihua() {
        return workJihua;
    }

    public void setWorkJihua(String workJihua) {
        this.workJihua = workJihua;
    }
}
